﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Plain.Web
{
    public static class RequestExtensions{
        public static T get<T>(this HttpRequest request, string q){
            try {
                return (T)Convert.ChangeType(request[q], typeof(T));
            } catch { 
                return default(T); 
            }
        }
    }
}
